//
//  JobCell1.m
//  ActSistant
//
//  Created by Hieu Nguyen Trung on 3/1/13.
//

#import "JobCell1.h"

@implementation JobCell1

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

-(void) layoutSubviews{
    [self.cellTextView setScrollEnabled:false];
    [self.cellTextView setBounces:false];
    [self.cellTextView setEditable:false];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)dealloc {
    [_cellImageView release];
    [_cellTextView release];
    [super dealloc];
}

-(void) drawRect:(CGRect)rect{
    //Center vertical alignment
    //CGFloat topCorrect = ([tv bounds].size.height - [tv contentSize].height * [tv zoomScale])/2.0;
    //topCorrect = ( topCorrect < 0.0 ? 0.0 : topCorrect );
    //tv.contentOffset = (CGPoint){.x = 0, .y = -topCorrect};
    
    //Bottom vertical alignment
    CGFloat topCorrect = ([self.cellTextView bounds].size.height - [self.cellTextView contentSize].height);
    topCorrect = (topCorrect <0.0 ? 0.0 : topCorrect);
    self.cellTextView.contentOffset = (CGPoint){.x = 0, .y = -topCorrect};
}
@end
